From: Matthias Clasen Date: Sun, 17 Dec 2017 22:09:55 +0000 (-0500) Subject: cups: Warn only once if colord is not available X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~38^2~116 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=0eaa76a032a42b612387cf06d7a12304b95d8ac2;p=gtk%2B3.0.git cups: Warn only once if colord is not available No need to keep complaining about this. https://bugzilla.gnome.org/show_bug.cgi?id=791650 --- diff --git a/modules/printbackends/cups/gtkprintercups.c b/modules/printbackends/cups/gtkprintercups.c index 068aba74c5..525382aa8a 100644 --- a/modules/printbackends/cups/gtkprintercups.c +++ b/modules/printbackends/cups/gtkprintercups.c @@ -539,12 +539,17 @@ colord_client_connect_cb (GObject *source_object, gboolean ret; GError *error = NULL; GtkPrinterCups *printer = GTK_PRINTER_CUPS (user_data); + static gboolean colord_warned = FALSE; ret = cd_client_connect_finish (CD_CLIENT (source_object), res, &error); if (!ret) { - g_warning ("failed to contact colord: %s", error->message); + if (!colord_warned) + { + g_warning ("failed to contact colord: %s", error->message); + colord_warned = TRUE; + } g_error_free (error); }